/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.cmc.service.merchant.service.persistence;

import com.cmc.service.merchant.model.MerchantEntry;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the merchant entry service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author ntcuong1
 * @see MerchantEntryPersistenceImpl
 * @see MerchantEntryUtil
 * @generated
 */
public interface MerchantEntryPersistence extends BasePersistence<MerchantEntry> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link MerchantEntryUtil} to access the merchant entry persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the merchant entry in the entity cache if it is enabled.
	*
	* @param merchantEntry the merchant entry
	*/
	public void cacheResult(
		com.cmc.service.merchant.model.MerchantEntry merchantEntry);

	/**
	* Caches the merchant entries in the entity cache if it is enabled.
	*
	* @param merchantEntries the merchant entries
	*/
	public void cacheResult(
		java.util.List<com.cmc.service.merchant.model.MerchantEntry> merchantEntries);

	/**
	* Creates a new merchant entry with the primary key. Does not add the merchant entry to the database.
	*
	* @param merchantId the primary key for the new merchant entry
	* @return the new merchant entry
	*/
	public com.cmc.service.merchant.model.MerchantEntry create(long merchantId);

	/**
	* Removes the merchant entry with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param merchantId the primary key of the merchant entry
	* @return the merchant entry that was removed
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry remove(long merchantId)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.cmc.service.merchant.model.MerchantEntry updateImpl(
		com.cmc.service.merchant.model.MerchantEntry merchantEntry,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry with the primary key or throws a {@link com.cmc.service.merchant.NoSuchMerchantEntryException} if it could not be found.
	*
	* @param merchantId the primary key of the merchant entry
	* @return the merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByPrimaryKey(
		long merchantId)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param merchantId the primary key of the merchant entry
	* @return the merchant entry, or <code>null</code> if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByPrimaryKey(
		long merchantId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the merchant entries where companyId = &#63;.
	*
	* @param companyId the company ID
	* @return the matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByCompany(
		long companyId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the merchant entries where companyId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param companyId the company ID
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @return the range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByCompany(
		long companyId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the merchant entries where companyId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param companyId the company ID
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByCompany(
		long companyId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where companyId = &#63;.
	*
	* @param companyId the company ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByCompany_First(
		long companyId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where companyId = &#63;.
	*
	* @param companyId the company ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByCompany_First(
		long companyId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where companyId = &#63;.
	*
	* @param companyId the company ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByCompany_Last(
		long companyId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where companyId = &#63;.
	*
	* @param companyId the company ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByCompany_Last(
		long companyId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entries before and after the current merchant entry in the ordered set where companyId = &#63;.
	*
	* @param merchantId the primary key of the current merchant entry
	* @param companyId the company ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry[] findByCompany_PrevAndNext(
		long merchantId, long companyId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where code = &#63; or throws a {@link com.cmc.service.merchant.NoSuchMerchantEntryException} if it could not be found.
	*
	* @param code the code
	* @return the matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByCode(
		java.lang.String code)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where code = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param code the code
	* @return the matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByCode(
		java.lang.String code)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where code = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param code the code
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByCode(
		java.lang.String code, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where parentId = &#63; or throws a {@link com.cmc.service.merchant.NoSuchMerchantEntryException} if it could not be found.
	*
	* @param parentId the parent ID
	* @return the matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByParent(
		long parentId)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where parentId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param parentId the parent ID
	* @return the matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByParent(
		long parentId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entry where parentId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param parentId the parent ID
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByParent(
		long parentId, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the merchant entries where type = &#63;.
	*
	* @param type the type
	* @return the matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByType(
		java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the merchant entries where type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param type the type
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @return the range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByType(
		java.lang.String type, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the merchant entries where type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param type the type
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByType(
		java.lang.String type, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where type = &#63;.
	*
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByType_First(
		java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where type = &#63;.
	*
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByType_First(
		java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where type = &#63;.
	*
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByType_Last(
		java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where type = &#63;.
	*
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByType_Last(
		java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entries before and after the current merchant entry in the ordered set where type = &#63;.
	*
	* @param merchantId the primary key of the current merchant entry
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry[] findByType_PrevAndNext(
		long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the merchant entries where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @return the matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByParentAndMerchantType(
		long parentId, java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the merchant entries where parentId = &#63; and type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param parentId the parent ID
	* @param type the type
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @return the range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByParentAndMerchantType(
		long parentId, java.lang.String type, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the merchant entries where parentId = &#63; and type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param parentId the parent ID
	* @param type the type
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findByParentAndMerchantType(
		long parentId, java.lang.String type, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByParentAndMerchantType_First(
		long parentId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first merchant entry in the ordered set where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByParentAndMerchantType_First(
		long parentId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry findByParentAndMerchantType_Last(
		long parentId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last merchant entry in the ordered set where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching merchant entry, or <code>null</code> if a matching merchant entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry fetchByParentAndMerchantType_Last(
		long parentId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the merchant entries before and after the current merchant entry in the ordered set where parentId = &#63; and type = &#63;.
	*
	* @param merchantId the primary key of the current merchant entry
	* @param parentId the parent ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next merchant entry
	* @throws com.cmc.service.merchant.NoSuchMerchantEntryException if a merchant entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry[] findByParentAndMerchantType_PrevAndNext(
		long merchantId, long parentId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the merchant entries.
	*
	* @return the merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the merchant entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @return the range of merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the merchant entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.MerchantEntry> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the merchant entries where companyId = &#63; from the database.
	*
	* @param companyId the company ID
	* @throws SystemException if a system exception occurred
	*/
	public void removeByCompany(long companyId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the merchant entry where code = &#63; from the database.
	*
	* @param code the code
	* @return the merchant entry that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry removeByCode(
		java.lang.String code)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the merchant entry where parentId = &#63; from the database.
	*
	* @param parentId the parent ID
	* @return the merchant entry that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.cmc.service.merchant.model.MerchantEntry removeByParent(
		long parentId)
		throws com.cmc.service.merchant.NoSuchMerchantEntryException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the merchant entries where type = &#63; from the database.
	*
	* @param type the type
	* @throws SystemException if a system exception occurred
	*/
	public void removeByType(java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the merchant entries where parentId = &#63; and type = &#63; from the database.
	*
	* @param parentId the parent ID
	* @param type the type
	* @throws SystemException if a system exception occurred
	*/
	public void removeByParentAndMerchantType(long parentId,
		java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the merchant entries from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries where companyId = &#63;.
	*
	* @param companyId the company ID
	* @return the number of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countByCompany(long companyId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries where code = &#63;.
	*
	* @param code the code
	* @return the number of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countByCode(java.lang.String code)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries where parentId = &#63;.
	*
	* @param parentId the parent ID
	* @return the number of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countByParent(long parentId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries where type = &#63;.
	*
	* @param type the type
	* @return the number of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countByType(java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries where parentId = &#63; and type = &#63;.
	*
	* @param parentId the parent ID
	* @param type the type
	* @return the number of matching merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countByParentAndMerchantType(long parentId, java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of merchant entries.
	*
	* @return the number of merchant entries
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the agent entries associated with the merchant entry.
	*
	* @param pk the primary key of the merchant entry
	* @return the agent entries associated with the merchant entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.AgentEntry> getAgentEntries(
		long pk) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the agent entries associated with the merchant entry.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the merchant entry
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @return the range of agent entries associated with the merchant entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.AgentEntry> getAgentEntries(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the agent entries associated with the merchant entry.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the merchant entry
	* @param start the lower bound of the range of merchant entries
	* @param end the upper bound of the range of merchant entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of agent entries associated with the merchant entry
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.cmc.service.merchant.model.AgentEntry> getAgentEntries(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of agent entries associated with the merchant entry.
	*
	* @param pk the primary key of the merchant entry
	* @return the number of agent entries associated with the merchant entry
	* @throws SystemException if a system exception occurred
	*/
	public int getAgentEntriesSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the agent entry is associated with the merchant entry.
	*
	* @param pk the primary key of the merchant entry
	* @param agentEntryPK the primary key of the agent entry
	* @return <code>true</code> if the agent entry is associated with the merchant entry; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsAgentEntry(long pk, long agentEntryPK)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the merchant entry has any agent entries associated with it.
	*
	* @param pk the primary key of the merchant entry to check for associations with agent entries
	* @return <code>true</code> if the merchant entry has any agent entries associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsAgentEntries(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;
}